using System.Collections.Generic;
using System.Text;

namespace OracleInternal.SqlAndPlsqlParser.LocalParsing
{
	internal class OracleLpSimpleExpression : OracleLpExpression
	{
		protected OracleLpSimpleExpressionType m_vSimpleExpressionType;

		public OracleLpSimpleExpressionType SimpleExpressionType
		{
			get
			{
				return m_vSimpleExpressionType;
			}
			set
			{
				m_vSimpleExpressionType = value;
			}
		}

		public OracleLpSimpleExpression(OracleLpStatementElement parent)
			: base(parent)
		{
			m_vExpressionType = OracleLpExpressionType.SIMPLE_EXPRESSION;
		}

		public override void EvaluateDatatype()
		{
		}

		public override IList<OracleLpExpression> GetAllTerminalExpressions()
		{
			if (m_vAllTerminalExpressions == null)
			{
				m_vAllTerminalExpressions = new List<OracleLpExpression>();
				m_vAllTerminalExpressions.Add(this);
			}
			return m_vAllTerminalExpressions;
		}

		internal override void ToString(StringBuilder sb)
		{
			base.ToString(sb);
			sb.Append("  SimpleExprType: ").Append(m_vSimpleExpressionType);
		}
	}
}
